import http.client
import urllib
httpClient = None
while(True):
    try:
        httpClient = http.client.HTTPConnection('169.254.239.148',8080,timeout = 30)
        httpClient.request('GET','/testleapmotion5/servlet')

        response = httpClient.getresponse();
    
    
        restr = response.read().decode('utf-8')
    
        print(restr)

        if(restr == ''):
            print ("no one")
        if(restr == '1'):
            print("shun shi zhen")
    except Exception as e:
        print (e)
    finally:
        if httpClient:
            httpClient.close()
